﻿/* ===============================================
* 功能描述：DBHelper  
* 创 建 人：阿拉丁等等等灯
* 创建日期：2021/4/26 17:08:50
* CLR版本：4.0.30319.42000
* 机器名称：YANXH-PC
* 用户所在域：YANXH-PC
* 注册组织名：
* 命名空间名称：TodoCase.Utils
* 当前登录用户名：mryan
* ================================================*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;

namespace TodoCase.Utils
{
    public class DBHelper
    {
        static ConnectionConfig dbconfig = new ConnectionConfig()
        {
            IsAutoCloseConnection = true,
            ConnectionString = Properties.Settings.Default.DBConnectString,
            DbType = DbType.MySql
        };

        private static SqlSugarClient cliend = null;

        public static SqlSugarClient SugarClient
        {
            get
            {
                if (null == cliend)
                {
                    cliend = new SqlSugarClient(dbconfig);
                }
                return cliend;
            }
        }
    }
}
